package com.ostrich.module_main.adapter

import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentActivity
import androidx.viewpager2.adapter.FragmentStateAdapter

/**
 * @Author : yaotianxue
 * @Time : On 2023/10/26 10:02
 * @Description : MainPagerAdapter
 */

class MainPagerAdapter(private val fa:FragmentActivity,private val list:MutableList<Fragment>):FragmentStateAdapter(fa) {
    override fun getItemCount(): Int {
        return list.size
    }

    override fun createFragment(position: Int): Fragment {
        return list[position]
    }
}